/*
 * SpringBoot向前端呈现数据
 * 天津工业大学 大数据实训 第四组
 * 杨玺锟
 * 2020-03-07
 **/

package com.tjise.g_fats_enemy.springboot.controller;

import com.tjise.g_fats_enemy.springboot.dao.GameStatsDao;
import com.tjise.g_fats_enemy.springboot.po.GameStats;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class GameStatsController {
    @Autowired
    GameStatsDao gameStatsDao;

    @RequestMapping(value = "getGameStats", method = {RequestMethod.GET, RequestMethod.POST})
    @ResponseBody
    public List<GameStats> getGameStatus(){
        // System.out.println(game_stats_list);
        return gameStatsDao.findGameStats();
    }
}
